# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-webrobots
_gemname=webrobots
pkgver=0.1.2
pkgrel=16
pkgdesc='A Ruby library to help write robots.txt compliant web robots.'
arch=('any')
license=('custom:unknown')
makedepends=('ruby')
url='https://github.com/knu/webrobots'
source=("http://rubygems.org/downloads/$_gemname-$pkgver.gem")
sha512sums=('8b2a27a1758e613bced16b59a2b1708f468921388882d7ea483c7b6cbb5173fa24032f4db271734820225c5e90d3f30d07c5fb682d0d807c637f535ef7256097')
noextract=("$_gemname-$pkgver.gem")

package() {
  _gemdir=$(ruby -e 'puts Gem.default_dir')

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -n "$pkgdir/usr/bin" -i "$pkgdir$_gemdir" "$_gemname-$pkgver.gem"
  else
    gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
      -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"
  fi
}

